using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Designer
{
    public abstract class TransformBase
    {
        protected TransformBase()
        {
        }

        public virtual bool ContainsSourcePoint(int x, int y)
        {
            return false;
        }

        public virtual Point TransformPoint(Point p)
        {
            return this.TransformPoint(p.X, p.Y);
        }

        public virtual Point TransformPoint(int x, int y)
        {
            return Point.Empty;
        }

        public virtual PointF TransformPointF(PointF p)
        {
            return this.TransformPointF(p.X, p.Y);
        }

        public virtual PointF TransformPointF(float x, float y)
        {
            return PointF.Empty;
        }

        public virtual Rectangle TransformRectangle(Rectangle rect)
        {
            return new Rectangle(this.TransformPoint(rect.Left, rect.Top), this.TransformSize(rect.Width, rect.Height));
        }

        public virtual Rectangle TransformRectangle(int left, int top, int width, int height)
        {
            return new Rectangle(this.TransformPoint(left, top), this.TransformSize(width, height));
        }

        public virtual RectangleF TransformRectangleF(RectangleF rect)
        {
            return new RectangleF(this.TransformPointF(rect.Left, rect.Top), this.TransformSizeF(rect.Width, rect.Height));
        }

        public virtual RectangleF TransformRectangleF(float left, float top, float width, float height)
        {
            return new RectangleF(this.TransformPointF(left, top), this.TransformSizeF(width, height));
        }

        public virtual Size TransformSize(Size vSize)
        {
            return this.TransformSize(vSize.Width, vSize.Height);
        }

        public virtual Size TransformSize(int w, int h)
        {
            return Size.Empty;
        }

        public virtual SizeF TransformSizeF(SizeF vSize)
        {
            return this.TransformSizeF(vSize.Width, vSize.Height);
        }

        public virtual SizeF TransformSizeF(float w, float h)
        {
            return SizeF.Empty;
        }

        public virtual Point UnTransformPoint(Point p)
        {
            return this.UnTransformPoint(p.X, p.Y);
        }

        public virtual Point UnTransformPoint(int x, int y)
        {
            return Point.Empty;
        }

        public virtual PointF UnTransformPointF(PointF p)
        {
            return this.UnTransformPointF(p.X, p.Y);
        }

        public virtual PointF UnTransformPointF(float x, float y)
        {
            return PointF.Empty;
        }

        public virtual Rectangle UnTransformRectangle(Rectangle rect)
        {
            return new Rectangle(this.UnTransformPoint(rect.Location), this.UnTransformSize(rect.Size));
        }

        public virtual Rectangle UnTransformRectangle(int left, int top, int width, int height)
        {
            return new Rectangle(this.UnTransformPoint(left, top), this.UnTransformSize(width, height));
        }

        public virtual RectangleF UnTransformRectangleF(RectangleF rect)
        {
            return new RectangleF(this.UnTransformPointF(rect.Location), this.UnTransformSizeF(rect.Size));
        }

        public virtual RectangleF UnTransformRectangleF(float left, float top, float width, float height)
        {
            return new RectangleF(this.UnTransformPointF(left, top), this.UnTransformSizeF(width, height));
        }

        public virtual Size UnTransformSize(Size vSize)
        {
            return this.UnTransformSize(vSize.Width, vSize.Height);
        }

        public virtual Size UnTransformSize(int w, int h)
        {
            return Size.Empty;
        }

        public virtual SizeF UnTransformSizeF(SizeF vSize)
        {
            return this.UnTransformSizeF(vSize.Width, vSize.Height);
        }

        public virtual SizeF UnTransformSizeF(float w, float h)
        {
            return SizeF.Empty;
        }
    }
}
